<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <script type="text/javascript" src="assets/jwplayer.min.js"></script>
    <link type="text/css" rel="stylesheet" href="assets/style.css" />
    <title>Basic Setup</title>

</head>
<body>

<h2>Basic Setup</h2>

<div id="player"></div>
<script type="text/javascript">
function loadPlayer(key,captions) {
    var options = {
        file: 'http://content.bitsontherun.com/videos/'+key+'.mp4',
        height: 270,
        image: 'http://content.bitsontherun.com/thumbs/'+key.substr(0,8)+'-480.jpg',
        plugins: {
            '../captions.js': {}
        },
        flashplayer: 'assets/player.swf',
        width: 480,
        debug: 'console'
    };
    if(captions) { 
        options.plugins['../captions.js'].file = captions;
    }
    jwplayer("player").setup(options);
}
</script>


<ul>
    <li><a href="javascript:loadPlayer('7OCSON1y','assets/corrie.srt')">srt captions</a></li>
    <li><a href="javascript:loadPlayer('7OCSON1y','assets/corrie.xml')">dfxp captions</a></li>
    <li><a href="javascript:loadPlayer('aytCR4cx-393434')">mp4 captions</a></li>
</ul>

<p>Test on a Flash-enabled browser. In all cases, watch the entire video.<br/>
Captions should render and disappear at the correct time.</p>


</body>
</html>